<script type="text/javascript">
	$(document).ready(function(){
			var div_name = "#content_previous_order";
			var offset = <?php echo $offset; ?>;
			if(offset > 0){				
				var per_page_index = <?php echo $per_page_index; ?>;
				if(<?php echo count($transaction_list);?> == 0){
					offset = offset - per_page_index;
					var embedString = "<?php echo $embedString; ?>";
					$(div_name).load($("#base_url").attr('alt')+'admin/order/load/'+offset+embedString);
				}
			}
		}
	);
	$(function(){
		convert_paging("#content_previous_order",".paging");
	});
</script>
			<?php if(count($transaction_list) == 0 ) { ?>
            	<div class="title col0">No Transaction</div>
			<?php }else{ ?>
            
                <div class="title col0">Trans. Code</div>
                <div class="title col1">Product Name</div>
                <div class="title col2">Order Date</div>
                <div class="title col3">Price</div>
                <div class="title col4">Passanger</div>
                <div class="title col5">Departure</div>
                <div class="title col6">Return</div>
                
                <!-- perulangan -->
                <?php
				$i = 0;
               	foreach($transaction_list as $list){ 
				$i++;
				?>
                <div class="<?php echo ($i%2==1)?"odd":"even";?>">
                    <div class="col0"><?php echo $list['transaction_code'];?></div>
                    <div class="col1"><?php echo $list['name'];?></div>
                    <div class="col2"><?php echo $list['entry_date'];?></div>
                    <div class="col3"><?php echo $list['price'];?></div>
                    <div class="col4"><?php echo $list['jumlah_penumpang'];?></div>
                    <div class="col5"><?php echo $list['tanggal_berangkat'];?></div>
                    <div class="col6"><?php echo $list['tanggal_pulang'];?></div>
                    <div class="col7"><a href="<?php echo base_url();?>admin/order/detail/<?php echo $list['transaction_id'];?>" class="button_red">detail</a></div>
                </div>
                <?php } ?>
                <!-- akhir perulangan -->
                <div class="clear"></div>
                <div class="paging"><?php echo $pagination;?></div>
			<?php } ?>                